﻿using System;
using System.Collections.Generic;
using JTLeigh.Commerce.Spencer.Features.ProductImages.Common.Entities;

namespace JTLeigh.Commerce.Spencer.Features.ProductImages.Business.Caches
{

	/// <summary>
	/// Cache used to store product images.
	/// </summary>
	public interface IProductImageCache
	{

		#region Methods

		/// <summary>
		/// Gets the product images for the specified product from the cache.
		/// </summary>
		/// <param name="tenantId">The tenant identifier <see cref="Guid"/> of the tenant whose
		/// product images are to be retrieved.</param>
        /// <param name="catalogId">The catalog identifier <see cref="String"/> of the catalog
        /// that the product whose images are to be retrieved is in.</param>
        /// <param name="productId">The product identifier <see cref="String"/> of the product 
		/// whose images are to be retrieved.</param>
		/// <returns>The <see cref="Dictionary{TKey,TValue}"/> of <see cref="ProductImage"/> 
		/// objects for the product from the cache, or <see langword="null" /> if the images for
		/// the product have not been cached.</returns>
		Dictionary<Guid, ProductImage> GetProductImages(Guid tenantId, string catalogId, string productId);

		/// <summary>
		/// Sets the product images for the specified product in the cache.
		/// </summary>
		/// <param name="tenantId">The tenant identifier <see cref="Guid"/> of the tenant whose
		/// product images are to be stored.</param>
        /// <param name="catalogId">The catalog identifier <see cref="String"/> of the catalog
        /// whose images are to be stored.</param>
        /// <param name="productId">The product identifier <see cref="String"/> of the product 
		/// whose images are to be stored.</param>
		/// <param name="images">The <see cref="Dictionary{TKey,TValue}"/> of 
		/// <see cref="ProductImage"/> objects to store.</param>
		void SetProductImages(Guid tenantId, string catalogId, string productId, Dictionary<Guid, ProductImage> images);

		#endregion // Methods

	}

}
